<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Win32k: validate.c 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Win32k
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00902.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">宏定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">validate.c 文件参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="a03629_source.html">precomp.h</a>&quot;</code><br />
<code>#include &lt;ntsdexts.h&gt;</code><br />
</div>
<p><a href="a00902_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
宏定义</h2></td></tr>
<tr class="memitem:ae0e950f3d836953875f357d1b0802df8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00902.html#ae0e950f3d836953875f357d1b0802df8">INCCRITSECCOUNT</a></td></tr>
<tr class="separator:ae0e950f3d836953875f357d1b0802df8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:a6847c167387f09c65388a9ad1d8afb03"><td class="memItemLeft" align="right" valign="top">NTSTATUS&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00902.html#a6847c167387f09c65388a9ad1d8afb03">ValidateHandle</a> (HANDLE handle, ACCESS_MASK amDesired, POBJECT_TYPE objectType, void **ppvoid)</td></tr>
<tr class="separator:a6847c167387f09c65388a9ad1d8afb03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad791b69adc282dfe1c26db8b137d6a11"><td class="memItemLeft" align="right" valign="top">NTSTATUS&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00902.html#ad791b69adc282dfe1c26db8b137d6a11">ValidateHwinsta</a> (HWINSTA hwinsta, ACCESS_MASK amDesired, <a class="el" href="a00365.html#a0d80f75801f7be76834d65980cdc857e">PWINDOWSTATION</a> *ppwinsta)</td></tr>
<tr class="separator:ad791b69adc282dfe1c26db8b137d6a11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39b12063444a7e1bc0feabd001efd223"><td class="memItemLeft" align="right" valign="top">NTSTATUS&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00902.html#a39b12063444a7e1bc0feabd001efd223">ValidateHdesk</a> (HDESK hdesk, ACCESS_MASK amDesired, <a class="el" href="a00365.html#a07e239ec4a8e696c787df685bce70b61">PDESKTOP</a> *ppdesk)</td></tr>
<tr class="separator:a39b12063444a7e1bc0feabd001efd223"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4798cfd2b279ea65bc4ec58554856520"><td class="memItemLeft" align="right" valign="top">HRGN&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00902.html#a4798cfd2b279ea65bc4ec58554856520">UserValidateCopyRgn</a> (HRGN hrgn)</td></tr>
<tr class="separator:a4798cfd2b279ea65bc4ec58554856520"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47dda1f338284caf5c8478d1a008e89d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00902.html#a47dda1f338284caf5c8478d1a008e89d">ValidateHmenu</a> (HMENU hmenu)</td></tr>
<tr class="separator:a47dda1f338284caf5c8478d1a008e89d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a179f5d15541adc4cb2cd436941cc9b57"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> FASTCALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00902.html#a179f5d15541adc4cb2cd436941cc9b57">ValidateHwnd</a> (HWND hwnd)</td></tr>
<tr class="separator:a179f5d15541adc4cb2cd436941cc9b57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5be02a4963f3343f1a153de160ad41b"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00902.html#ac5be02a4963f3343f1a153de160ad41b">UserEnterUserCritSec</a> (VOID)</td></tr>
<tr class="separator:ac5be02a4963f3343f1a153de160ad41b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99d9237a57f8bc702ffa5b74082d0614"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00902.html#a99d9237a57f8bc702ffa5b74082d0614">UserLeaveUserCritSec</a> (VOID)</td></tr>
<tr class="separator:a99d9237a57f8bc702ffa5b74082d0614"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c7ef79abee831655235a1fd8735de96"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00902.html#a5c7ef79abee831655235a1fd8735de96">EnterCrit</a> (void)</td></tr>
<tr class="separator:a5c7ef79abee831655235a1fd8735de96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa81050421c36d2ccc85f3d8ac04cca8c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00902.html#aa81050421c36d2ccc85f3d8ac04cca8c">EnterSharedCrit</a> (void)</td></tr>
<tr class="separator:aa81050421c36d2ccc85f3d8ac04cca8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae97136d6eaa018e66e8cd7e7480cbb28"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00902.html#ae97136d6eaa018e66e8cd7e7480cbb28">LeaveCrit</a> (void)</td></tr>
<tr class="separator:ae97136d6eaa018e66e8cd7e7480cbb28"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">宏定义说明</h2>
<a id="ae0e950f3d836953875f357d1b0802df8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae0e950f3d836953875f357d1b0802df8">&#9670;&nbsp;</a></span>INCCRITSECCOUNT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define INCCRITSECCOUNT</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00902_source.html">validate.c</a> 第 <a class="el" href="a00902_source.html#l00532">532</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">函数说明</h2>
<a id="a5c7ef79abee831655235a1fd8735de96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c7ef79abee831655235a1fd8735de96">&#9670;&nbsp;</a></span>EnterCrit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EnterCrit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00902_source.html">validate.c</a> 第 <a class="el" href="a00902_source.html#l00537">537</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;{</div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;    CheckCritOut();</div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;    KeEnterCriticalRegion();</div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;    <a class="code" href="a00899.html#a21d2c32987c1b66c1c5cd43f67a81d9e">KeBoostCurrentThread</a>();</div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;    ExAcquireResourceExclusiveLite(<a class="code" href="a03257.html#ac6b62aff5aa60b8f170320cd7c3f32d7">gpresUser</a>, TRUE);</div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;    <a class="code" href="a00371.html#a162a73e20dfabca084a3ebb4581631a8">UserAssert</a>(<a class="code" href="a03257.html#a8cc8c8071c3b38eb6abd3dd172e4a79b">gptiCurrent</a> == NULL);</div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;    <a class="code" href="a03257.html#a8cc8c8071c3b38eb6abd3dd172e4a79b">gptiCurrent</a> = ((<a class="code" href="a00365.html#a177dce23f2b497ba8dc22f5a92d3f3d3">PTHREADINFO</a>)(W32GetCurrentThread()));</div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160; </div>
<div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;    <a class="code" href="a00902.html#ae0e950f3d836953875f357d1b0802df8">INCCRITSECCOUNT</a>;</div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03257_source.html#l00169">gpresUser</a>, <a class="el" href="a03257_source.html#l00021">gptiCurrent</a>, <a class="el" href="a00902_source.html#l00532">INCCRITSECCOUNT</a>, <a class="el" href="a00899.html#a21d2c32987c1b66c1c5cd43f67a81d9e">KeBoostCurrentThread()</a> , 以及 <a class="el" href="a00950_source.html#l00117">UserAssert</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00902_source.html#l00273">UserEnterUserCritSec()</a>.</p>

</div>
</div>
<a id="aa81050421c36d2ccc85f3d8ac04cca8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa81050421c36d2ccc85f3d8ac04cca8c">&#9670;&nbsp;</a></span>EnterSharedCrit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EnterSharedCrit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00902_source.html">validate.c</a> 第 <a class="el" href="a00902_source.html#l00550">550</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;{</div>
<div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160;    KeEnterCriticalRegion();</div>
<div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;    <a class="code" href="a00899.html#a21d2c32987c1b66c1c5cd43f67a81d9e">KeBoostCurrentThread</a>();</div>
<div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;    ExAcquireResourceSharedLite(<a class="code" href="a03257.html#ac6b62aff5aa60b8f170320cd7c3f32d7">gpresUser</a>, TRUE);</div>
<div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160; </div>
<div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;    <a class="code" href="a00902.html#ae0e950f3d836953875f357d1b0802df8">INCCRITSECCOUNT</a>;</div>
<div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03257_source.html#l00169">gpresUser</a>, <a class="el" href="a00902_source.html#l00532">INCCRITSECCOUNT</a> , 以及 <a class="el" href="a00899.html#a21d2c32987c1b66c1c5cd43f67a81d9e">KeBoostCurrentThread()</a>.</p>

</div>
</div>
<a id="ae97136d6eaa018e66e8cd7e7480cbb28"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae97136d6eaa018e66e8cd7e7480cbb28">&#9670;&nbsp;</a></span>LeaveCrit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LeaveCrit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00902_source.html">validate.c</a> 第 <a class="el" href="a00902_source.html#l00559">559</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;{</div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;    <a class="code" href="a00902.html#ae0e950f3d836953875f357d1b0802df8">INCCRITSECCOUNT</a>;</div>
<div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;    <a class="code" href="a00371.html#a162a73e20dfabca084a3ebb4581631a8">UserAssert</a>(bInAtomicOperation == FALSE);</div>
<div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160; </div>
<div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;<span class="preprocessor">#ifdef DEBUG</span></div>
<div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;    <a class="code" href="a03257.html#a8cc8c8071c3b38eb6abd3dd172e4a79b">gptiCurrent</a> = NULL;</div>
<div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;    ExReleaseResource(<a class="code" href="a03257.html#ac6b62aff5aa60b8f170320cd7c3f32d7">gpresUser</a>);</div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;    KeLeaveCriticalRegion();</div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;    CheckCritOut();</div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03257_source.html#l00169">gpresUser</a>, <a class="el" href="a03257_source.html#l00021">gptiCurrent</a>, <a class="el" href="a00902_source.html#l00532">INCCRITSECCOUNT</a> , 以及 <a class="el" href="a00950_source.html#l00117">UserAssert</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00902_source.html#l00278">UserLeaveUserCritSec()</a>.</p>

</div>
</div>
<a id="ac5be02a4963f3343f1a153de160ad41b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5be02a4963f3343f1a153de160ad41b">&#9670;&nbsp;</a></span>UserEnterUserCritSec()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID UserEnterUserCritSec </td>
          <td>(</td>
          <td class="paramtype">VOID&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00902_source.html">validate.c</a> 第 <a class="el" href="a00902_source.html#l00273">273</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;{</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;    <a class="code" href="a00902.html#a5c7ef79abee831655235a1fd8735de96">EnterCrit</a>();</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00902_source.html#l00537">EnterCrit()</a>.</p>

</div>
</div>
<a id="a99d9237a57f8bc702ffa5b74082d0614"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99d9237a57f8bc702ffa5b74082d0614">&#9670;&nbsp;</a></span>UserLeaveUserCritSec()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID UserLeaveUserCritSec </td>
          <td>(</td>
          <td class="paramtype">VOID&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00902_source.html">validate.c</a> 第 <a class="el" href="a00902_source.html#l00278">278</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;{</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;    <a class="code" href="a00902.html#ae97136d6eaa018e66e8cd7e7480cbb28">LeaveCrit</a>();</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00902_source.html#l00559">LeaveCrit()</a>.</p>

</div>
</div>
<a id="a4798cfd2b279ea65bc4ec58554856520"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4798cfd2b279ea65bc4ec58554856520">&#9670;&nbsp;</a></span>UserValidateCopyRgn()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">HRGN UserValidateCopyRgn </td>
          <td>(</td>
          <td class="paramtype">HRGN&#160;</td>
          <td class="paramname"><em>hrgn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00902_source.html">validate.c</a> 第 <a class="el" href="a00902_source.html#l00111">111</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;{</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    HRGN hrgnCopy = NULL;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160; </div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keywordflow">if</span> (hrgn &amp;&amp; (GreValidateServerHandle(hrgn, RGN_TYPE))) {</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160; </div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        hrgnCopy = GreCreateRectRgn(0, 0, 0, 0);</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160; </div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        <span class="keywordflow">if</span> (CopyRgn(hrgnCopy, hrgn) == ERROR) {</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;            GreDeleteObject(hrgnCopy);</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160; </div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;            hrgnCopy = NULL;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        }</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    }</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; </div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="keywordflow">return</span> hrgnCopy;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">被这些函数引用 <a class="el" href="a00671_source.html#l00647">xxxDWP_DoNCActivate()</a> , 以及 <a class="el" href="a00872_source.html#l04685">xxxSetWindowRgn()</a>.</p>

</div>
</div>
<a id="a6847c167387f09c65388a9ad1d8afb03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6847c167387f09c65388a9ad1d8afb03">&#9670;&nbsp;</a></span>ValidateHandle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NTSTATUS ValidateHandle </td>
          <td>(</td>
          <td class="paramtype">HANDLE&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ACCESS_MASK&#160;</td>
          <td class="paramname"><em>amDesired</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">POBJECT_TYPE&#160;</td>
          <td class="paramname"><em>objectType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void **&#160;</td>
          <td class="paramname"><em>ppvoid</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00902_source.html">validate.c</a> 第 <a class="el" href="a00902_source.html#l00030">30</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;{</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    NTSTATUS    Status;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    Status = ObReferenceObjectByHandle(</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;            handle,</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;            amDesired,</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;            objectType,</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;            KeGetPreviousMode(),</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;            ppvoid,</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;            NULL);</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keywordflow">if</span> (!NT_SUCCESS(Status)) {</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        <a class="code" href="a00371.html#aea4d59d1a42882b0cf9dea78f02ce1b6">RIPNTERR1</a>(Status,</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;                 <a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>,</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;                 <span class="stringliteral">&quot;Unable to reference handle (%#0.8lx) in ValidateHandle&quot;</span>,</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;                 handle);</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    }</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160; </div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keywordflow">return</span> Status;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00371_source.html#l00029">RIP_WARNING</a> , 以及 <a class="el" href="a00371_source.html#l00126">RIPNTERR1</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00902_source.html#l00088">ValidateHdesk()</a> , 以及 <a class="el" href="a00902_source.html#l00066">ValidateHwinsta()</a>.</p>

</div>
</div>
<a id="a39b12063444a7e1bc0feabd001efd223"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a39b12063444a7e1bc0feabd001efd223">&#9670;&nbsp;</a></span>ValidateHdesk()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NTSTATUS ValidateHdesk </td>
          <td>(</td>
          <td class="paramtype">HDESK&#160;</td>
          <td class="paramname"><em>hdesk</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ACCESS_MASK&#160;</td>
          <td class="paramname"><em>amDesired</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#a07e239ec4a8e696c787df685bce70b61">PDESKTOP</a> *&#160;</td>
          <td class="paramname"><em>ppdesk</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00902_source.html">validate.c</a> 第 <a class="el" href="a00902_source.html#l00088">88</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;{</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="a00902.html#a6847c167387f09c65388a9ad1d8afb03">ValidateHandle</a>(</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;            (HANDLE) hdesk,</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;            amDesired,</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;            *<a class="code" href="a00899.html#a6b562f476cdc12794cf052fff8d41096">ExDesktopObjectType</a>,</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;            ppdesk);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00899.html#a6b562f476cdc12794cf052fff8d41096">ExDesktopObjectType</a> , 以及 <a class="el" href="a00902_source.html#l00030">ValidateHandle()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03641_source.html#l00243">HardErrorControl()</a>, <a class="el" href="a03614_source.html#l06487">NtUserBuildHwndList()</a>, <a class="el" href="a03614_source.html#l01018">NtUserSetThreadDesktop()</a> , 以及 <a class="el" href="a03614_source.html#l01051">NtUserSwitchDesktop()</a>.</p>

</div>
</div>
<a id="a47dda1f338284caf5c8478d1a008e89d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47dda1f338284caf5c8478d1a008e89d">&#9670;&nbsp;</a></span>ValidateHmenu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a> ValidateHmenu </td>
          <td>(</td>
          <td class="paramtype">HMENU&#160;</td>
          <td class="paramname"><em>hmenu</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00902_source.html">validate.c</a> 第 <a class="el" href="a00902_source.html#l00141">141</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;{</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <a class="code" href="a02889.html">PTHREADINFO</a> pti = PtiCurrentShared();</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    <a class="code" href="a02625.html">PMENU</a> pmenuRet;</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160; </div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    pmenuRet = (<a class="code" href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a>)<a class="code" href="a00365.html#adcc97c154408fd5498551b3d94332c1b">HMValidateHandle</a>(hmenu, TYPE_MENU);</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160; </div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <span class="keywordflow">if</span> (pmenuRet != NULL &amp;&amp;</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;            ((pti-&gt;<a class="code" href="a02889.html#abb1184e0c5805b5ad89b79dcc2bd17c8">rpdesk</a> != NULL &amp;&amp;  <span class="comment">// hack so console initialization works.</span></div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;            pmenuRet-&gt;<a class="code" href="a02625.html#a89169c528df8ad521ef1f85c782b1dc8">head</a>.rpdesk != pti-&gt;<a class="code" href="a02889.html#abb1184e0c5805b5ad89b79dcc2bd17c8">rpdesk</a>) ||</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;            <span class="comment">// if the menu is marked destroy it is invalid.</span></div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;            HMIsMarkDestroy(pmenuRet)) ){</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <a class="code" href="a00371.html#adbdd8355d15a97b6f3a9e4766e6a2cc1">RIPERR1</a>(ERROR_INVALID_MENU_HANDLE, <a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>, <span class="stringliteral">&quot;Invalid menu handle (%#.8lx)&quot;</span>, hmenu);</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    }</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160; </div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="keywordflow">return</span> pmenuRet;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00365_source.html#l01993">tagMENU::head</a>, <a class="el" href="a03752_source.html#l00232">HMValidateHandle()</a>, <a class="el" href="a00371_source.html#l00029">RIP_WARNING</a>, <a class="el" href="a00371_source.html#l00120">RIPERR1</a> , 以及 <a class="el" href="a00899_source.html#l02288">tagTHREADINFO::rpdesk</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00764_source.html#l00822">SetLPITEMInfo()</a>, <a class="el" href="a03590_source.html#l02538">xxxMenuWindowProc()</a> , 以及 <a class="el" href="a03242_source.html#l00392">xxxSetWindowData()</a>.</p>

</div>
</div>
<a id="ad791b69adc282dfe1c26db8b137d6a11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad791b69adc282dfe1c26db8b137d6a11">&#9670;&nbsp;</a></span>ValidateHwinsta()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NTSTATUS ValidateHwinsta </td>
          <td>(</td>
          <td class="paramtype">HWINSTA&#160;</td>
          <td class="paramname"><em>hwinsta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ACCESS_MASK&#160;</td>
          <td class="paramname"><em>amDesired</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#a0d80f75801f7be76834d65980cdc857e">PWINDOWSTATION</a> *&#160;</td>
          <td class="paramname"><em>ppwinsta</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00902_source.html">validate.c</a> 第 <a class="el" href="a00902_source.html#l00066">66</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;{</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="a00902.html#a6847c167387f09c65388a9ad1d8afb03">ValidateHandle</a>(</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;            (HANDLE) hwinsta,</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;            amDesired,</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;            *<a class="code" href="a00899.html#a23e8283bc242953b172d97079c117f38">ExWindowStationObjectType</a>,</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;            ppwinsta);</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00899.html#a23e8283bc242953b172d97079c117f38">ExWindowStationObjectType</a> , 以及 <a class="el" href="a00902_source.html#l00030">ValidateHandle()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03614_source.html#l06606">NtUserBuildNameList()</a>, <a class="el" href="a03614_source.html#l00776">NtUserCloseWindowStation()</a>, <a class="el" href="a03614_source.html#l05576">NtUserLockWindowStation()</a>, <a class="el" href="a03614_source.html#l05649">NtUserSetLogonNotifyWindow()</a>, <a class="el" href="a03614_source.html#l05616">NtUserSetWindowStationUser()</a> , 以及 <a class="el" href="a03614_source.html#l05596">NtUserUnlockWindowStation()</a>.</p>

</div>
</div>
<a id="a179f5d15541adc4cb2cd436941cc9b57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a179f5d15541adc4cb2cd436941cc9b57">&#9670;&nbsp;</a></span>ValidateHwnd()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> FASTCALL ValidateHwnd </td>
          <td>(</td>
          <td class="paramtype">HWND&#160;</td>
          <td class="paramname"><em>hwnd</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00902_source.html">validate.c</a> 第 <a class="el" href="a00902_source.html#l00176">176</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;{</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    <a class="code" href="a02553.html">PHE</a> phe;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    <a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> dw;</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    WORD uniq;</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="comment">     * This is a macro that does an AND with HMINDEXBITS,</span></div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="comment">     * so it is fast.</span></div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    dw = HMIndexFromHandle(hwnd);</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160; </div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;<span class="comment">     * Make sure it is part of our handle table.</span></div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    <span class="keywordflow">if</span> (dw &lt; gpsi-&gt;cHandleEntries) {</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;<span class="comment">         * Make sure it is the handle</span></div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;<span class="comment">         * the app thought it was, by</span></div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;<span class="comment">         * checking the uniq bits in</span></div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;<span class="comment">         * the handle against the uniq</span></div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;<span class="comment">         * bits in the handle entry.</span></div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;        phe = &amp;<a class="code" href="a00020.html#ac02f0141c423acd033ecdd2a757a3cc1">gSharedInfo</a>.<a class="code" href="a02521.html#aba571224616f70b9a072015bc9873676">aheList</a>[dw];</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        uniq = HMUniqFromHandle(hwnd);</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        <span class="keywordflow">if</span> (   uniq == phe-&gt;<a class="code" href="a02553.html#a933e5c6adafeaf9086a99630bf9ccd5e">wUniq</a></div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;            || uniq == 0</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;            || uniq == HMUNIQBITS</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;            ) {</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160; </div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;<span class="comment">             * Now make sure the app is</span></div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;<span class="comment">             * passing the right handle</span></div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;<span class="comment">             * type for this api. If the</span></div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;<span class="comment">             * handle is TYPE_FREE, this&#39;ll</span></div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;<span class="comment">             * catch it.</span></div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;            <span class="keywordflow">if</span> (phe-&gt;<a class="code" href="a02553.html#ab51f0b363324b2cf09057a4c55d5100f">bType</a> == TYPE_WINDOW) {</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;                <a class="code" href="a02889.html">PTHREADINFO</a> pti = PtiCurrentShared();</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;                <span class="comment">/*</span></div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;<span class="comment">                 * This is called from thunks for routines in the shared critsec.</span></div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;<span class="comment">                 */</span></div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;                <a class="code" href="a02581.html">PWND</a> pwndRet = (<a class="code" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>)phe-&gt;<a class="code" href="a02553.html#a31029ec0d53466bc06025fef712527a8">phead</a>;</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160; </div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;                <span class="comment">/*</span></div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;<span class="comment">                 * This test establishes that the window belongs to the current</span></div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;<span class="comment">                 * &#39;desktop&#39;.. The two exceptions are for the desktop-window of</span></div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;<span class="comment">                 * the current desktop, which ends up belonging to another desktop,</span></div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;<span class="comment">                 * and when pti-&gt;rpdesk is NULL.  This last case happens for</span></div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;<span class="comment">                 * initialization of TIF_SYSTEMTHREAD threads (ie. console windows).</span></div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;<span class="comment">                 * IanJa doesn&#39;t know if we should be test TIF_CSRSSTHREAD here, but</span></div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;<span class="comment">                 * JohnC thinks the whole test below is no longer required ??? LATER</span></div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;<span class="comment">                 */</span></div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;                if (pwndRet != NULL) {</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                    <span class="keywordflow">if</span> (GETPTI(pwndRet) == pti ||</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;                            (!HMIsMarkDestroy(pwndRet) &amp;&amp;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;                            (pwndRet-&gt;<a class="code" href="a02581.html#a6be2d067ba15d4ec8cfc2e87922094f5">head</a>.rpdesk == pti-&gt;<a class="code" href="a02889.html#abb1184e0c5805b5ad89b79dcc2bd17c8">rpdesk</a> ||</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;                             (pti-&gt;<a class="code" href="a02889.html#ae8b869ec5b101646649020f5b0fd5d0d">TIF_flags</a> &amp; TIF_SYSTEMTHREAD) ||  <span class="comment">// | TIF_CSRSSTHREAD I think</span></div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;                             <a class="code" href="a00656.html#aac6858a0152bf701787d897d9accacbd">GetDesktopView</a>(pti-&gt;<a class="code" href="a02889.html#a215417492fadc11678c689da2447f02e">ppi</a>, pwndRet-&gt;<a class="code" href="a02581.html#a6be2d067ba15d4ec8cfc2e87922094f5">head</a>.rpdesk) !=</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;                                    NULL))) {</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;                        <span class="keywordflow">return</span> pwndRet;</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;                    }</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;                }</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;            }</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;        }</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    }</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160; </div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;    <a class="code" href="a00371.html#adbdd8355d15a97b6f3a9e4766e6a2cc1">RIPERR1</a>(ERROR_INVALID_WINDOW_HANDLE,</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;            <a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>,</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;            <span class="stringliteral">&quot;ValidateHwnd: Invalid hwnd (%#.8lx)&quot;</span>,</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;            hwnd);</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160; </div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00365_source.html#l01060">tagSHAREDINFO::aheList</a>, <a class="el" href="a00365_source.html#l01168">_HANDLEENTRY::bType</a>, <a class="el" href="a00365_source.html#l00383">_CLIENTINFO::CallbackWnd</a>, <a class="el" href="a00563_source.html#l00175">DWORD</a>, <a class="el" href="a00656_source.html#l01905">GetDesktopView()</a>, <a class="el" href="a00020_source.html#l00040">gSharedInfo</a>, <a class="el" href="a00365_source.html#l01389">tagWND::head</a>, <a class="el" href="a03752_source.html#l00232">HMValidateHandle()</a>, <a class="el" href="a00365_source.html#l00355">_CALLBACKWND::hwnd</a>, <a class="el" href="a00365_source.html#l01166">_HANDLEENTRY::phead</a>, <a class="el" href="a00899_source.html#l02271">tagTHREADINFO::ppi</a>, <a class="el" href="a00365_source.html#l00356">_CALLBACKWND::pwnd</a>, <a class="el" href="a00371_source.html#l00029">RIP_WARNING</a>, <a class="el" href="a00371_source.html#l00120">RIPERR1</a>, <a class="el" href="a00899_source.html#l02288">tagTHREADINFO::rpdesk</a>, <a class="el" href="a00899_source.html#l02294">tagTHREADINFO::TIF_flags</a> , 以及 <a class="el" href="a00365_source.html#l01170">_HANDLEENTRY::wUniq</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aa02889_html_ae8b869ec5b101646649020f5b0fd5d0d"><div class="ttname"><a href="a02889.html#ae8b869ec5b101646649020f5b0fd5d0d">tagTHREADINFO::TIF_flags</a></div><div class="ttdeci">DWORD TIF_flags</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02294">userk.h:2294</a></div></div>
<div class="ttc" id="aa00365_html_adcc97c154408fd5498551b3d94332c1b"><div class="ttname"><a href="a00365.html#adcc97c154408fd5498551b3d94332c1b">HMValidateHandle</a></div><div class="ttdeci">PVOID FASTCALL HMValidateHandle(HANDLE h, BYTE btype)</div><div class="ttdef"><b>Definition:</b> <a href="a03752_source.html#l00232">rtl/wow.c:232</a></div></div>
<div class="ttc" id="aa00902_html_a6847c167387f09c65388a9ad1d8afb03"><div class="ttname"><a href="a00902.html#a6847c167387f09c65388a9ad1d8afb03">ValidateHandle</a></div><div class="ttdeci">NTSTATUS ValidateHandle(HANDLE handle, ACCESS_MASK amDesired, POBJECT_TYPE objectType, void **ppvoid)</div><div class="ttdef"><b>Definition:</b> <a href="a00902_source.html#l00030">validate.c:30</a></div></div>
<div class="ttc" id="aa00899_html_a6b562f476cdc12794cf052fff8d41096"><div class="ttname"><a href="a00899.html#a6b562f476cdc12794cf052fff8d41096">ExDesktopObjectType</a></div><div class="ttdeci">POBJECT_TYPE * ExDesktopObjectType</div></div>
<div class="ttc" id="aa02553_html"><div class="ttname"><a href="a02553.html">_HANDLEENTRY</a></div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01165">user.h:1165</a></div></div>
<div class="ttc" id="aa02625_html_a89169c528df8ad521ef1f85c782b1dc8"><div class="ttname"><a href="a02625.html#a89169c528df8ad521ef1f85c782b1dc8">tagMENU::head</a></div><div class="ttdeci">PROCOBJHEAD head</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01993">user.h:1993</a></div></div>
<div class="ttc" id="aa00902_html_ae0e950f3d836953875f357d1b0802df8"><div class="ttname"><a href="a00902.html#ae0e950f3d836953875f357d1b0802df8">INCCRITSECCOUNT</a></div><div class="ttdeci">#define INCCRITSECCOUNT</div><div class="ttdef"><b>Definition:</b> <a href="a00902_source.html#l00532">validate.c:532</a></div></div>
<div class="ttc" id="aa00365_html_af18dd4dd192e00a176acc4dc89084f34"><div class="ttname"><a href="a00365.html#af18dd4dd192e00a176acc4dc89084f34">PMENU</a></div><div class="ttdeci">struct tagMENU * PMENU</div></div>
<div class="ttc" id="aa00365_html_a1a2ef1c363aa0787a8f8a7dde2a34aaf"><div class="ttname"><a href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a></div><div class="ttdeci">struct tagWND * PWND</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l00059">user.h:59</a></div></div>
<div class="ttc" id="aa00656_html_aac6858a0152bf701787d897d9accacbd"><div class="ttname"><a href="a00656.html#aac6858a0152bf701787d897d9accacbd">GetDesktopView</a></div><div class="ttdeci">PDESKTOPVIEW GetDesktopView(PPROCESSINFO ppi, PDESKTOP pdesk)</div><div class="ttdef"><b>Definition:</b> <a href="a00656_source.html#l01905">desktop.c:1905</a></div></div>
<div class="ttc" id="aa00371_html_a162a73e20dfabca084a3ebb4581631a8"><div class="ttname"><a href="a00371.html#a162a73e20dfabca084a3ebb4581631a8">UserAssert</a></div><div class="ttdeci">#define UserAssert(exp)</div><div class="ttdef"><b>Definition:</b> <a href="a00950_source.html#l00117">usersrv.h:117</a></div></div>
<div class="ttc" id="aa02889_html_a215417492fadc11678c689da2447f02e"><div class="ttname"><a href="a02889.html#a215417492fadc11678c689da2447f02e">tagTHREADINFO::ppi</a></div><div class="ttdeci">struct tagPROCESSINFO * ppi</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02271">userk.h:2271</a></div></div>
<div class="ttc" id="aa02553_html_a933e5c6adafeaf9086a99630bf9ccd5e"><div class="ttname"><a href="a02553.html#a933e5c6adafeaf9086a99630bf9ccd5e">_HANDLEENTRY::wUniq</a></div><div class="ttdeci">WORD wUniq</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01170">user.h:1170</a></div></div>
<div class="ttc" id="aa02581_html_a6be2d067ba15d4ec8cfc2e87922094f5"><div class="ttname"><a href="a02581.html#a6be2d067ba15d4ec8cfc2e87922094f5">tagWND::head</a></div><div class="ttdeci">THROBJHEAD head</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01389">user.h:1389</a></div></div>
<div class="ttc" id="aa00020_html_ac02f0141c423acd033ecdd2a757a3cc1"><div class="ttname"><a href="a00020.html#ac02f0141c423acd033ecdd2a757a3cc1">gSharedInfo</a></div><div class="ttdeci">SHAREDINFO gSharedInfo</div><div class="ttdef"><b>Definition:</b> <a href="a00020_source.html#l00040">clglobal.c:40</a></div></div>
<div class="ttc" id="aa03257_html_a8cc8c8071c3b38eb6abd3dd172e4a79b"><div class="ttname"><a href="a03257.html#a8cc8c8071c3b38eb6abd3dd172e4a79b">gptiCurrent</a></div><div class="ttdeci">PTHREADINFO gptiCurrent</div><div class="ttdef"><b>Definition:</b> <a href="a03257_source.html#l00021">kernel/globals.c:21</a></div></div>
<div class="ttc" id="aa02625_html"><div class="ttname"><a href="a02625.html">tagMENU</a></div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01992">user.h:1992</a></div></div>
<div class="ttc" id="aa00563_html_a074685e97e89d6aa2accdfcb82328699"><div class="ttname"><a href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a></div><div class="ttdeci">ddeml v[i&lt; inst &gt;][t&lt; type &gt;][hObj|pObj] Dump DDEML state information ddeml lists all ddeml instances for this process n ddeml t&lt; type &gt; lists all ddeml objects of the given type n n assumes link is first DWORD</div><div class="ttdef"><b>Definition:</b> <a href="a00563_source.html#l00175">exts.h:175</a></div></div>
<div class="ttc" id="aa02581_html"><div class="ttname"><a href="a02581.html">tagWND</a></div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01388">user.h:1388</a></div></div>
<div class="ttc" id="aa00371_html_aea4d59d1a42882b0cf9dea78f02ce1b6"><div class="ttname"><a href="a00371.html#aea4d59d1a42882b0cf9dea78f02ce1b6">RIPNTERR1</a></div><div class="ttdeci">#define RIPNTERR1(idErr, flags, szFmt, p1)</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00126">winerrp.h:126</a></div></div>
<div class="ttc" id="aa00902_html_ae97136d6eaa018e66e8cd7e7480cbb28"><div class="ttname"><a href="a00902.html#ae97136d6eaa018e66e8cd7e7480cbb28">LeaveCrit</a></div><div class="ttdeci">void LeaveCrit(void)</div><div class="ttdef"><b>Definition:</b> <a href="a00902_source.html#l00559">validate.c:559</a></div></div>
<div class="ttc" id="aa00371_html_a41f433389f20db57f042022a662e96de"><div class="ttname"><a href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a></div><div class="ttdeci">#define RIP_WARNING</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00029">winerrp.h:29</a></div></div>
<div class="ttc" id="aa00902_html_a5c7ef79abee831655235a1fd8735de96"><div class="ttname"><a href="a00902.html#a5c7ef79abee831655235a1fd8735de96">EnterCrit</a></div><div class="ttdeci">void EnterCrit(void)</div><div class="ttdef"><b>Definition:</b> <a href="a00902_source.html#l00537">validate.c:537</a></div></div>
<div class="ttc" id="aa00365_html_a177dce23f2b497ba8dc22f5a92d3f3d3"><div class="ttname"><a href="a00365.html#a177dce23f2b497ba8dc22f5a92d3f3d3">PTHREADINFO</a></div><div class="ttdeci">struct tagTHREADINFO * PTHREADINFO</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l00762">user.h:762</a></div></div>
<div class="ttc" id="aa00899_html_a23e8283bc242953b172d97079c117f38"><div class="ttname"><a href="a00899.html#a23e8283bc242953b172d97079c117f38">ExWindowStationObjectType</a></div><div class="ttdeci">POBJECT_TYPE * ExWindowStationObjectType</div></div>
<div class="ttc" id="aa02553_html_ab51f0b363324b2cf09057a4c55d5100f"><div class="ttname"><a href="a02553.html#ab51f0b363324b2cf09057a4c55d5100f">_HANDLEENTRY::bType</a></div><div class="ttdeci">BYTE bType</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01168">user.h:1168</a></div></div>
<div class="ttc" id="aa02553_html_a31029ec0d53466bc06025fef712527a8"><div class="ttname"><a href="a02553.html#a31029ec0d53466bc06025fef712527a8">_HANDLEENTRY::phead</a></div><div class="ttdeci">PHEAD phead</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01166">user.h:1166</a></div></div>
<div class="ttc" id="aa03257_html_ac6b62aff5aa60b8f170320cd7c3f32d7"><div class="ttname"><a href="a03257.html#ac6b62aff5aa60b8f170320cd7c3f32d7">gpresUser</a></div><div class="ttdeci">PERESOURCE gpresUser</div><div class="ttdef"><b>Definition:</b> <a href="a03257_source.html#l00169">kernel/globals.c:169</a></div></div>
<div class="ttc" id="aa02889_html_abb1184e0c5805b5ad89b79dcc2bd17c8"><div class="ttname"><a href="a02889.html#abb1184e0c5805b5ad89b79dcc2bd17c8">tagTHREADINFO::rpdesk</a></div><div class="ttdeci">PDESKTOP rpdesk</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02288">userk.h:2288</a></div></div>
<div class="ttc" id="aa00899_html_a21d2c32987c1b66c1c5cd43f67a81d9e"><div class="ttname"><a href="a00899.html#a21d2c32987c1b66c1c5cd43f67a81d9e">KeBoostCurrentThread</a></div><div class="ttdeci">VOID KeBoostCurrentThread(VOID)</div></div>
<div class="ttc" id="aa02521_html_aba571224616f70b9a072015bc9873676"><div class="ttname"><a href="a02521.html#aba571224616f70b9a072015bc9873676">tagSHAREDINFO::aheList</a></div><div class="ttdeci">struct _HANDLEENTRY * aheList</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01060">user.h:1060</a></div></div>
<div class="ttc" id="aa00371_html_adbdd8355d15a97b6f3a9e4766e6a2cc1"><div class="ttname"><a href="a00371.html#adbdd8355d15a97b6f3a9e4766e6a2cc1">RIPERR1</a></div><div class="ttdeci">#define RIPERR1(idErr, flags, szFmt, p1)</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00120">winerrp.h:120</a></div></div>
<div class="ttc" id="aa02889_html"><div class="ttname"><a href="a02889.html">tagTHREADINFO</a></div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02260">userk.h:2260</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_cd70cb5eb491250157f2d55d3ff4b13e.html">backup</a></li><li class="navelem"><a class="el" href="dir_ba2b673b566ba104b956abdc6dec0552.html">org</a></li><li class="navelem"><a class="el" href="dir_5bb0003d7907b45051943541418399f5.html">ntuser</a></li><li class="navelem"><a class="el" href="dir_2a0a56546b70a0973705719e6a88eab3.html">kernel</a></li><li class="navelem"><a class="el" href="a00902.html">validate.c</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
